﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace GMAC.ReportingSystem.Business.Components
{
    public class GeneralParameterComponent
    {
        private DataAccess.GeneralParameterDataAccess dac;

        public GeneralParameterComponent()
        {
            this.dac = new GMAC.ReportingSystem.DataAccess.GeneralParameterDataAccess();
        }

        public Business.Entities.Configuration.ConfigurationParameterCollection GetConfigurationValues()
        {
            return dac.GetConfigurationValues();
        }

        public bool SetConfigurationValues(Business.Entities.Configuration.ConfigurationParameterCollection values)
        {
            if (values == null || values.Count == 0)
                throw new ArgumentNullException("The configuration values must be specified.");

            return dac.SetConfigurationValues(values);
        }
        public DataTable GetConfigurationValues(int GeneralID)
        {
            return dac.GetConfigurationValues(GeneralID);
        }
    }
}
